#include<stdio.h>
#include<assert.h>
#include<stdbool.h>
#include<stdlib.h>

//建大堆

typedef int HPDataType;
typedef struct Heap
{
	HPDataType* _a;
	int _size;
	int _capacity;
}Heap;

// 堆的初始化
void HeapInint(Heap* hp);

void HeapDestory(Heap* hp);

void HeapPush(Heap* hp, HPDataType x);

void AdjustUp(HPDataType* a, int child);

void HeapPop(Heap* hp);

bool HeapEmpty(Heap* hp);

HPDataType HeapTop(Heap* hp);

int HeapSize(Heap* hp);

void HeapCreate(Heap* hp, HPDataType* a, int n);

